package org.bioversityinternational.mgbms.model.domain;

// Generated 13 oct. 2011 12:11:05 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * Accession generated by hbm2java
 */
@Entity
@Table(name = "Accession", schema = "dbo", catalog = "imgbms", uniqueConstraints = @UniqueConstraint(columnNames = "itcCode"))
public class Accession implements java.io.Serializable {

	private int id;
	private Centre centre;
	private Country country;
	private BiologicalStatus biologicalStatus;
	private String itcCode;
	private String name;
	private String synonyms;
	private Date receivedDate;
	private Date aquisitionDate;
	private String introduceBy;
	private String donorCode;
	private Integer materialTypeId;
	private Integer ploidyId;
	private String pedigree;
	private String variantYesNo;
	private String annexI;
	private Date annexIdate;
	private String smta;
	private Date smtaDate;
	private String fao;
	private String faoDate;
	private Integer taxonId;
	private String scientificName;
	private String classification;
	private Boolean improved;
	private String notes;
	private Set<PreviousLocation> previousLocations = new HashSet<PreviousLocation>(
			0);
	private Set<AssOrderAccession> assOrderAccessions = new HashSet<AssOrderAccession>(
			0);
	private Set<AccessionActivity> accessionActivities = new HashSet<AccessionActivity>(
			0);
	private Set<Material> materials = new HashSet<Material>(0);
	private Set<AssShipmentAccession> assShipmentAccessions = new HashSet<AssShipmentAccession>(
			0);

	public Accession() {
	}

	public Accession(int id) {
		this.id = id;
	}

	public Accession(int id, Centre centre, Country country,
			BiologicalStatus biologicalStatus, String itcCode, String name,
			String synonyms, Date receivedDate, Date aquisitionDate,
			String introduceBy, String donorCode, Integer materialTypeId,
			Integer ploidyId, String pedigree, String variantYesNo,
			String annexI, Date annexIdate, String smta, Date smtaDate,
			String fao, String faoDate, Integer taxonId, String scientificName,
			String classification, Boolean improved, String notes,
			Set<PreviousLocation> previousLocations,
			Set<AssOrderAccession> assOrderAccessions,
			Set<AccessionActivity> accessionActivities,
			Set<Material> materials,
			Set<AssShipmentAccession> assShipmentAccessions) {
		this.id = id;
		this.centre = centre;
		this.country = country;
		this.biologicalStatus = biologicalStatus;
		this.itcCode = itcCode;
		this.name = name;
		this.synonyms = synonyms;
		this.receivedDate = receivedDate;
		this.aquisitionDate = aquisitionDate;
		this.introduceBy = introduceBy;
		this.donorCode = donorCode;
		this.materialTypeId = materialTypeId;
		this.ploidyId = ploidyId;
		this.pedigree = pedigree;
		this.variantYesNo = variantYesNo;
		this.annexI = annexI;
		this.annexIdate = annexIdate;
		this.smta = smta;
		this.smtaDate = smtaDate;
		this.fao = fao;
		this.faoDate = faoDate;
		this.taxonId = taxonId;
		this.scientificName = scientificName;
		this.classification = classification;
		this.improved = improved;
		this.notes = notes;
		this.previousLocations = previousLocations;
		this.assOrderAccessions = assOrderAccessions;
		this.accessionActivities = accessionActivities;
		this.materials = materials;
		this.assShipmentAccessions = assShipmentAccessions;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "institutionId")
	public Centre getCentre() {
		return this.centre;
	}

	public void setCentre(Centre centre) {
		this.centre = centre;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "countryOfOriginId")
	public Country getCountry() {
		return this.country;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "bioStatusId")
	public BiologicalStatus getBiologicalStatus() {
		return this.biologicalStatus;
	}

	public void setBiologicalStatus(BiologicalStatus biologicalStatus) {
		this.biologicalStatus = biologicalStatus;
	}

	@Column(name = "itcCode", unique = true, length = 7)
	public String getItcCode() {
		return this.itcCode;
	}

	public void setItcCode(String itcCode) {
		this.itcCode = itcCode;
	}

	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "synonyms", length = 50)
	public String getSynonyms() {
		return this.synonyms;
	}

	public void setSynonyms(String synonyms) {
		this.synonyms = synonyms;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "receivedDate", length = 23)
	public Date getReceivedDate() {
		return this.receivedDate;
	}

	public void setReceivedDate(Date receivedDate) {
		this.receivedDate = receivedDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "aquisitionDate", length = 23)
	public Date getAquisitionDate() {
		return this.aquisitionDate;
	}

	public void setAquisitionDate(Date aquisitionDate) {
		this.aquisitionDate = aquisitionDate;
	}

	@Column(name = "introduceBy", length = 80)
	public String getIntroduceBy() {
		return this.introduceBy;
	}

	public void setIntroduceBy(String introduceBy) {
		this.introduceBy = introduceBy;
	}

	@Column(name = "donorCode", length = 50)
	public String getDonorCode() {
		return this.donorCode;
	}

	public void setDonorCode(String donorCode) {
		this.donorCode = donorCode;
	}

	@Column(name = "materialTypeId")
	public Integer getMaterialTypeId() {
		return this.materialTypeId;
	}

	public void setMaterialTypeId(Integer materialTypeId) {
		this.materialTypeId = materialTypeId;
	}

	@Column(name = "ploidyId")
	public Integer getPloidyId() {
		return this.ploidyId;
	}

	public void setPloidyId(Integer ploidyId) {
		this.ploidyId = ploidyId;
	}

	@Column(name = "pedigree", length = 50)
	public String getPedigree() {
		return this.pedigree;
	}

	public void setPedigree(String pedigree) {
		this.pedigree = pedigree;
	}

	@Column(name = "variantYesNo", length = 10)
	public String getVariantYesNo() {
		return this.variantYesNo;
	}

	public void setVariantYesNo(String variantYesNo) {
		this.variantYesNo = variantYesNo;
	}

	@Column(name = "annexI", length = 50)
	public String getAnnexI() {
		return this.annexI;
	}

	public void setAnnexI(String annexI) {
		this.annexI = annexI;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "annexIDate", length = 23)
	public Date getAnnexIdate() {
		return this.annexIdate;
	}

	public void setAnnexIdate(Date annexIdate) {
		this.annexIdate = annexIdate;
	}

	@Column(name = "smta", length = 50)
	public String getSmta() {
		return this.smta;
	}

	public void setSmta(String smta) {
		this.smta = smta;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "smtaDate", length = 23)
	public Date getSmtaDate() {
		return this.smtaDate;
	}

	public void setSmtaDate(Date smtaDate) {
		this.smtaDate = smtaDate;
	}

	@Column(name = "fao", length = 50)
	public String getFao() {
		return this.fao;
	}

	public void setFao(String fao) {
		this.fao = fao;
	}

	@Column(name = "faoDate", length = 4)
	public String getFaoDate() {
		return this.faoDate;
	}

	public void setFaoDate(String faoDate) {
		this.faoDate = faoDate;
	}

	@Column(name = "taxonId")
	public Integer getTaxonId() {
		return this.taxonId;
	}

	public void setTaxonId(Integer taxonId) {
		this.taxonId = taxonId;
	}

	@Column(name = "scientificName", length = 512)
	public String getScientificName() {
		return this.scientificName;
	}

	public void setScientificName(String scientificName) {
		this.scientificName = scientificName;
	}

	@Column(name = "classification", length = 50)
	public String getClassification() {
		return this.classification;
	}

	public void setClassification(String classification) {
		this.classification = classification;
	}

	@Column(name = "improved")
	public Boolean getImproved() {
		return this.improved;
	}

	public void setImproved(Boolean improved) {
		this.improved = improved;
	}

	@Column(name = "notes", length = 100)
	public String getNotes() {
		return this.notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "accession")
	public Set<PreviousLocation> getPreviousLocations() {
		return this.previousLocations;
	}

	public void setPreviousLocations(Set<PreviousLocation> previousLocations) {
		this.previousLocations = previousLocations;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "accession")
	public Set<AssOrderAccession> getAssOrderAccessions() {
		return this.assOrderAccessions;
	}

	public void setAssOrderAccessions(Set<AssOrderAccession> assOrderAccessions) {
		this.assOrderAccessions = assOrderAccessions;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "accession")
	public Set<AccessionActivity> getAccessionActivities() {
		return this.accessionActivities;
	}

	public void setAccessionActivities(
			Set<AccessionActivity> accessionActivities) {
		this.accessionActivities = accessionActivities;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "accession")
	public Set<Material> getMaterials() {
		return this.materials;
	}

	public void setMaterials(Set<Material> materials) {
		this.materials = materials;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "accession")
	public Set<AssShipmentAccession> getAssShipmentAccessions() {
		return this.assShipmentAccessions;
	}

	public void setAssShipmentAccessions(
			Set<AssShipmentAccession> assShipmentAccessions) {
		this.assShipmentAccessions = assShipmentAccessions;
	}

}
